/*
 * tweet character counter
 * written by ryutlis
 * email:ryutlis@ryutlism.org
 * homepage: http://www.ryutlism.org
 */

function charcount(text, display)
{
    var maxLength=140;
    var currentLength=text.value.length;
    var remaining=0;

    remaining=maxLength-currentLength;

    if (remaining <0) {
        display.style.color="red"; 
    } else {
        display.style.color="black";
    }
    display.innerHTML=remaining;
}
